class LoadingUI extends UIBase {

    public constructor() {
        super('MainLoadView');
    }

    private lb_progress:eui.Label;
    
    private load_page0:eui.Image;
    private load_page1:eui.Image;
    private load_page2:eui.Image;

    public is;

    public init()
    {
        this.width = GlobalManager.instance().curWidth();
        this.height = GlobalManager.instance().curHeight();
        // this.randomBg();
        this.createView();
    }

    // public addEvent()
    // {
    //     egret.startTick(this.movebg,this);
    // }

    // public movebg()
    // {
    //     this.load_page1.x -= 4
    //     this.load_page2.x -= 4

    //     return true;
    // }

    private createView(): void {
        UIManager.instance().showNormalLoading(true);
    }

    private load_page:eui.Image;
    public onProgress(current: number, total: number): void {
        if(current < total)
            this.lb_progress.text = `Loading...${current}/${total}`;
        else
           this.lb_progress.text = ''; 
    }

    public clear()
    {
        super.clear();
    }
}
